package com.xumx.demo.customize.annotate.demo;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.springframework.stereotype.Component;

/**
 * 定义注解行为
 */

@Aspect
@Component
public class KingmouseAspect {

    @Before("@annotation(kingMouse)")
    public void beforeKingMouse(KingMouse kingMouse) {
        System.out.println("Before " + kingMouse.value());
    }

    @After("@annotation(kingMouse)")
    public void afterKingMouse(KingMouse kingMouse) {
        System.out.println("After " + kingMouse.value());
    }


}
